﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Test1
{
    public partial class Form01 : Form
    {
        public Form01()
        {
            InitializeComponent();
        }
        #region 08-01 
        private void 加载子窗体ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form02 frm2 = new Form02();
            frm2.MdiParent = this;
            frm2.Show();
            Form03 frm3 = new Form03();
            frm3.MdiParent = this;
            frm3.Show();
            Form04 frm4 = new Form04();
            frm4.MdiParent = this;
            frm4.Show();
        }
        private void 水平平铺ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.TileHorizontal);
        }

        private void 垂直平铺ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.TileVertical);
        }

        private void 层叠排列ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.Cascade);
        }
        private void 关闭子窗体ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Login lg = new Login();
            lg.MdiParent = this;
            lg.Show();
        }
        #endregion

        #region 09-08
        private void Form1_Load(object sender, EventArgs e)
        {
            toolStripStatusLabel1.Text = "登录用户：" + Login.strName;
            toolStripStatusLabel2.Text = "登录时间" + DateTime.Now.ToLongTimeString();
        }
        #endregion
    }


}
